﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Common.Utilities.Excel.Validator
{
    public class ValidatorResult
    {
        public bool Result { set; get; }

        public List<String> MessageList
        {
            set
            {
                messageList = value;
            }

            get
            {
                return messageList;
            }
        }

        private List<String> messageList;

        public ValidatorResult()
        {
            Result = true;
            messageList = new List<string>();
        }

        public void AddValidatorResult(ValidatorResult result)
        {
            this.Result = this.Result && result.Result;

            for (int i = 0; i < result.MessageList.Count; i++)
            {
                this.MessageList.Add(result.MessageList[i]);
            }
        }
    }
}
